import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.5

import QtQml 2.15
import gtModule 1.0

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    //qml调用c++
    Button {
        text: info.name + " " + info.age + " " + Qt.formatDate(info.date, 'yyyy-MM-dd')
        onClicked: {
            info.name = 'gttt'
        }
    }

    Info {
        id: info
        name: 'click gt'
        age: 18
        date: new Date()
        onNameChanged: {
            console.log(name)
        }
    }

    //注入一个类型
}
